package com.naiterui.ehp.bs.doctor.utils;

import com.naiterui.ehp.bp.utils.lang.ConfigUtil;
import com.naiterui.ehp.bp.utils.qr.WeiXinEncrypUtil;

public final class AppSpreadDataUtil {

    public static String getSpreadDrUrl(Long doctorId) {
        return getSpreadUrl(doctorId, PropertyValueConstants.APP_DOCTOR_2_DOCTOR_TYPE);
    }

    public static String getSpreadPtUrl(Long doctorId) {
        return getSpreadUrl(doctorId, PropertyValueConstants.APP_DOCTOR_2_PATIENT_TYPE);
    }

    private static String getSpreadUrl(Long doctorId, int type) {
        String base = ConfigUtil.getString("app.spread.doctor.url");
        return WeiXinEncrypUtil.encryUrl(base, doctorId, type);
    }
}
